package atom.scenarios 
{
	import atom.message.Message;
	import atom.scenarios.ui.DefaultButton;
	import atom.ui.components.Block;
	import atom.ui.components.input.Button;
	import atom.ui.components.input.Text;
	import atom.ui.components.stack.HorizontalStacker;
	import atom.ui.View;
	import atom.ui.ViewContainer;
	import com.greensock.easing.Quad;
	import com.greensock.TweenLite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	/**
	 * ...
	 * @author Jorge Braccini
	 */
	public class Scenario4 extends ViewContainer {
		
		private var _tf:TextField;
		private var _temp:Object = { num: 0 }
		
		private var _container_a:HorizontalStacker;
		private var _button:DefaultButton;
		
		public function Scenario4(init:Object = null) {
			super(init);
		}
		
		override protected function create():void {
			super.create();
			
			_container_a = new HorizontalStacker({ center: true });
			_button = new DefaultButton( { mouseEnabled: false, bgColor: 0xff99 } );
			
			addView(_container_a);
			_container_a.addView(_button);
			
			resize();
			
			stage.addEventListener(Event.RESIZE, handleResize);
		}
		
		private function resize():void {
			_container_a.setSize(stage.stageWidth, stage.stageHeight);
		}
		
		private function handleResize(e:Event):void {
			resize();
		}
		
		private function randRange(a:Number, b:Number):Number {
			return a + (Math.random() * (b - a));
		}
		
	}

}